﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using CanDienTu_WS.Models;
using CanDienTu_WS.DTO;
namespace CanDienTu_WS
{
    [ServiceContract(Namespace = "http://tempuri.org/")]
	public interface ICanDienTu_Service
	{
		/////////////////// DULIEU ///////////////////
        [OperationContract]
        [WebGet(
            UriTemplate = "DuLieu_SelectAll",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
        List<DuLieuDTO> DuLieu_SelectAll();

		[OperationContract]
        [WebInvoke(
            Method = "GET", 
            UriTemplate = "DuLieu_SelectByID/{id}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		DuLieuDTO DuLieu_SelectByID(string id);

		[OperationContract]
        [WebInvoke(
            Method = "POST",
            UriTemplate = "DuLieu_Insert",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		bool DuLieu_Insert(DuLieuDTO obj);

		[OperationContract]
        [WebInvoke(
            Method = "POST",
            UriTemplate = "DuLieu_Delete",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		bool DuLieu_Delete(string id);

        [OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "test_service",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
        string test_service();
	}
}
